<html layout:decorator="public/layout" xmlns:miguo="http://www.w3.org/1999/html">
<div layout:fragment="content">
    <style>
        .layui-tab-title .layui-this:after {
            border-top: 3px solid #009688;
        }
        .layui-form-item {
            margin-bottom: 10px;
            clear: both;
            *zoom: 1;
        }
    </style>
    <div class="layui-tab">
        <widget:tabSelect name="tabId|name|id" sql="SELECT id, `name` FROM sys_config_group WHERE mark=1 ORDER BY sort ASC;" th:value="${tabId}?:0" href="/config/index"/>
        <div class="layui-tab-content">
            <!-- 表格工具栏 -->
            <form class="layui-form toolbar">
                <input name="groupId" id="groupId" type="hidden" th:value="${tabId}">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <div class="layui-input-inline">
                            <input type="text" name="title" placeholder="请输入配置标题" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <!-- 配置类型下拉单选 -->
                    <div class="layui-inline">
                        <div class="layui-input-inline">
                            <!-- 下拉单选 -->
                            <widget:singleSelect name="type|0|配置类型|name|id" th:data="${CONFIG_TYPE_LIST}" value="0"/>
                        </div>
                    </div>
                    <!-- 状态下拉单选 -->
                    <div class="layui-inline">
                        <div class="layui-input-inline">
                            <!-- 下拉单选 -->
                            <widget:singleSelect name="status|0|状态|name|id" th:data="${CONFIG_STATUS_LIST}" value="0"/>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <div class="layui-input-inline" style="width: auto;">
                            <widget:btnQuery name="查询"/>
                            <widget:btnAdd name="添加系统配置" th:value="'groupId=' + ${tabId}"/>
                            <widget:btnDAll name="批量删除"/>
                        </div>
                    </div>
                </div>
            </form>

            <!-- 数据表格 -->
            <table class="layui-hide" id="tableList" lay-filter="tableList"></table>

            <!-- 表格操作列 -->
            <script type="text/html" id="toolBar">
                <widget:btnEdit name="编辑"/>
                <widget:btnDel name="删除"/>
            </script>

            <!-- 状态 -->
            <script type="text/html" id="statusTpl">
                <input type="checkbox" name="status" value="{{ d.id }}" lay-skin="switch" lay-text="正常|停用" lay-filter="status" {{ d.status == 1 ? 'checked' : '' }} >
            </script>
        </div>
    </div>
</div>
</html>